﻿@{
    ViewBag.Title = "技能详细";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
<div class="layui-panel"  style="position:fixed;left:20px;top:100px">
    <ul class="layui-menu" id="skillMenu">
        <li lay-options="{id: 'JapLang'}">
            <div class="layui-menu-body-title">日语</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'Experience'}">
            <div class="layui-menu-body-title">开发经验</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li class="layui-menu-item-group layui-menu-item-up" lay-options="{type: 'group'}">
            <div class="layui-menu-body-title">
                前端 <i class="layui-icon layui-icon-down"></i>
            </div>
            <ul>
                <li lay-options="{id: 'PageSkill'}">
                    <div class="layui-menu-body-title">前端语言/框架</div>
                </li>
                <li lay-options="{id: 'ScriptLang'}">
                    <div class="layui-menu-body-title">脚本语言</div>
                </li>
            </ul>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li class="layui-menu-item-group layui-menu-item-up" lay-options="{type: 'group'}">
            <div class="layui-menu-body-title">
                后端 <i class="layui-icon layui-icon-down"></i>
            </div>
            <ul>
                <li lay-options="{id: 'HostLang'}">
                    <div class="layui-menu-body-title">Host系开发语言</div>
                </li>
                <li lay-options="{id: 'OpenLang'}">
                    <div class="layui-menu-body-title">Open系开发语言</div>
                </li>
                <li lay-options="{id: 'FrameWork'}">
                    <div class="layui-menu-body-title">后端框架</div>
                </li>
            </ul>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li class="layui-menu-item-group layui-menu-item-up" lay-options="{type: 'group'}">
            <div class="layui-menu-body-title">
                数据库相关 <i class="layui-icon layui-icon-down"></i>
            </div>
            <ul>
                <li lay-options="{id: 'DBHSkill'}">
                    <div class="layui-menu-body-title">Host系数据库</div>
                </li>
                <li lay-options="{id: 'DBOSkill'}">
                    <div class="layui-menu-body-title">Open系数据库</div>
                </li>
            </ul>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'PhoneSkill'}">
            <div class="layui-menu-body-title">移动端</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'OSSkill'}">
            <div class="layui-menu-body-title">操作系统</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'CloudLang'}">
            <div class="layui-menu-body-title">云开发</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'ServerSkill'}">
            <div class="layui-menu-body-title">服务器</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'ReportSkill'}">
            <div class="layui-menu-body-title">报表(帐票)</div>
        </li>
        <li class="layui-menu-item-divider"></li>
        <li lay-options="{id: 'OtherLang'}">
            <div class="layui-menu-body-title">其他语言</div>
        </li>
    </ul>
</div>
<div class="main layui-clear">
    <fieldset class="layui-elem-field layui-field-title">
        <legend id="staffTitle"></legend>
    </fieldset>
    <div class="layui-form layui-form-pane">
        <div class="wrap ">
            <form method="post">
                @Html.AntiForgeryToken()
                <input id="Id" name="Id" type="hidden" />
                <fieldset class="layui-elem-field" style="width:65%">
                    <legend id="skillKind">日语能力</legend>
                    <div class="layui-field-box"></div>
                </fieldset>
                <div class="layui-form-item">
                    <button id="btnSave" class="layui-btn layui-btn-normal" lay-filter="add" lay-submit>信息提交</button>
                </div>
            </form>
        </div>
        <div class="edge">
            <div class="user-about">
                <div class="user-looklog" style="padding-bottom:200px;">
                    <h3>擅长技术</h3>
                    <table id="Skilled" class="layui-table"></table>
                    <table id="Adept" class="layui-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>
@section scripts{
    <script>
        layui.use(['jquery', 'skill', 'dropdown'], function () {
            var $ = layui.jquery;
            var skill = layui.skill;
            var dropdown = layui.dropdown;
            
            var kind = layui.data('model').model.kind;
            if (kind == undefined || kind == null || kind == "") {
                kind = "JapLang";
            }
            var uid = layui.data('model').model.uid;
            var sname = layui.data('model').model.sname;
            if (uid == undefined || uid == null || uid == "") {
                uid = layui.data('user').user.uid;
            }
            skill.getNames(kind, uid);                               
            $("#staffTitle").text(sname + "(" + uid +") 技能明细");
            $("#Id").val(uid);            
            dropdown.on('click(skillMenu)', function (options) {                
                skill.getNames(options.id, uid);
            });           
        });
    </script>
}
